import static org.junit.Assert.*;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

public class test {
	private Money m1;
	private Money m2;
	private Money m3;
	
	@BeforeClass
	public static void oneTimeSetUp() {
		//System.out.println("Money Test's");
	}
	
	@AfterClass
	public static void oneTimeTearDown() {
		//System.out.println("Test's fertiggestellt");
	}
	
	@Before
	public void setUp() {
		//System.out.println("Neuer Test");
		m1 = new Money(15, "CHF");
		m2 = new Money(5, "CHF");
		m3 = new Money(20, "EURO");
	}
	
	@After
	public void tearDown() {
		
	}
	
	@Test
	public void addTestCHF() {
		Money erwarteterBetrag = new Money(20, "CHF");
		assertEquals("CHF + CHF", m1.add(m2), erwarteterBetrag);
	}
	
	@Test
	public void addTestEURO() {
		Money erwarteterBetrag = new Money(15, "CHF");
		assertEquals("CHF + EURO",m1.add(m3), erwarteterBetrag);
	}
	
	@Test
	public void equalsTest() {
		Money m4 = new Money(15, "CHF");
		assertTrue(m1.equals(m4));
		assertFalse(m1.equals(null));
		assertFalse(m1.equals(m2));
		m4 = new Money(15, null);
		assertFalse(m1.equals(m4));
		assertFalse(m4.equals(m1));
	}
	
	@Test
	public void hashCodeTest() {
		
	}
}
